<?php
/** @var TipoCartaController $this */
/** @var TipoCarta $model */
/** @var AweActiveForm $form */
Util::tsRegisterAssetJs('helper.js');
$form = $this->beginWidget('ext.AweCrud.components.AweActiveForm', array(
    'type' => 'horizontal',
    'id' => 'tipo-carta-form',
    'enableAjaxValidation' => false,
    'clientOptions' => array('validateOnSubmit' => true, 'validateOnChange' => false,),
    'enableClientValidation' => true,
        ));
?>

<div class="row-fluid">
    <div class="span10">
        <?php
        $this->beginWidget('zii.widgets.CPortlet', array(
            'title' => ($model->isNewRecord ? Yii::t('AweCrud.app', 'Create') : Yii::t('AweCrud.app', 'Update')) . ' ' . TipoCarta::label(1),
        ));
        ?>
        <p class="note">
            <?php echo Yii::t('AweCrud.app', 'Fields with') ?>
            <span class="required">*</span>
<?php echo Yii::t('AweCrud.app', 'are required') ?> 
        </p>
        <div class="row-fluid">
            <div class="span5">
<?php echo $form->textFieldRow($model, 'nombre', array('maxlength' => 45)) ?>
            </div>
            <div class="span5">
<?php echo $form->textFieldRow($model, 'descripcion', array('maxlength' => 45)) ?>
            </div>
        </div>

        <div class="form-actions">
            <?php
            $this->widget('bootstrap.widgets.TbButton', array(
                'buttonType' => 'submit',
                'type' => 'primary',
                'label' => $model->isNewRecord ? Yii::t('AweCrud.app', 'Create') : Yii::t('AweCrud.app', 'Save'),
            ));
            ?>
            <?php
            $this->widget('bootstrap.widgets.TbButton', array(
                //'buttonType'=>'submit',
                'label' => Yii::t('AweCrud.app', 'Cancel'),
                'htmlOptions' => array('onclick' => 'javascript:history.go(-1)')
            ));
            ?>
        </div>

        <?php $this->endWidget(); ?>
    </div>
        <?php $this->endWidget(); ?>
    <div class="span2">
        <?php
        $this->beginWidget('zii.widgets.CPortlet', array(
            'title' => Yii::t('AweCrud.app', 'Operaciones'),
        ));
        $this->widget('zii.widgets.CMenu', array(
            'items' => $this->menu,
            'htmlOptions' => array('class' => 'operations'),
        ));
        ?>
<?php $this->endWidget(); ?>
    </div>
</div>